package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SxCopyrightMapper;
import com.ruoyi.system.domain.SxCopyright;
import com.ruoyi.system.service.ISxCopyrightService;

/**
 * 版权图Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-20
 */
@Service
public class SxCopyrightServiceImpl implements ISxCopyrightService 
{
    @Autowired
    private SxCopyrightMapper sxCopyrightMapper;

    /**
     * 查询版权图
     * 
     * @param id 版权图主键
     * @return 版权图
     */
    @Override
    public SxCopyright selectSxCopyrightById(Long id)
    {
        return sxCopyrightMapper.selectSxCopyrightById(id);
    }

    /**
     * 查询版权图列表
     * 
     * @param sxCopyright 版权图
     * @return 版权图
     */
    @Override
    public List<SxCopyright> selectSxCopyrightList(SxCopyright sxCopyright)
    {
        return sxCopyrightMapper.selectSxCopyrightList(sxCopyright);
    }

    /**
     * 新增版权图
     * 
     * @param sxCopyright 版权图
     * @return 结果
     */
    @Override
    public int insertSxCopyright(SxCopyright sxCopyright)
    {
        sxCopyright.setCreateTime(DateUtils.getNowDate());
        return sxCopyrightMapper.insertSxCopyright(sxCopyright);
    }

    /**
     * 修改版权图
     * 
     * @param sxCopyright 版权图
     * @return 结果
     */
    @Override
    public int updateSxCopyright(SxCopyright sxCopyright)
    {
        return sxCopyrightMapper.updateSxCopyright(sxCopyright);
    }

    /**
     * 批量删除版权图
     * 
     * @param ids 需要删除的版权图主键
     * @return 结果
     */
    @Override
    public int deleteSxCopyrightByIds(Long[] ids)
    {
        return sxCopyrightMapper.deleteSxCopyrightByIds(ids);
    }

    /**
     * 删除版权图信息
     * 
     * @param id 版权图主键
     * @return 结果
     */
    @Override
    public int deleteSxCopyrightById(Long id)
    {
        return sxCopyrightMapper.deleteSxCopyrightById(id);
    }
}
